if SERVER then
	registerCommand("blind", "Turn on/off blindness the player you specify", function(param)
		local blindOn = "caller blinded target"
		local blindOff = "caller unblinded target"
		if param["settings"]["blind_msg_on"] then
			blindOn = param["settings"]["blind_msg_on"]
		end
		if param["settings"]["blind_msg_off"] then
			blindOff = param["settings"]["blind_msg_off"]
		end
		local blindTable = {}
		blindTable["caller"] = getCaller(param[1])
		local targs = string.Explode(" ", param[3])
		for i, targ in pairs(targs) do
			local plyTarg = getPlayerByName(targ)
			if plyTarg then
				blindTable["target"] = plyTarg:GetName()
				if (not plyTarg["moocow_blind"]) || plyTarg["moocow_blind"] == -1 then
					display(param[1], "blind", { plyTarg }, parseDisplayMessage(blindOn, blindTable))
					plyTarg["moocow_blind"] = 1
				else
					display(param[1], "blind", { plyTarg }, parseDisplayMessage(blindOff, blindTable))
					plyTarg["moocow_blind"] = -1
					plyTarg:ConCommand("pp_colormod 0")
					plyTarg:ConCommand("pp_colormod_brightness 0")
				end
			end
		end
	end)
	local function keepBlinded()
		for i, ply in pairs(player.GetAll()) do
			if	ply["moocow_blind"] == 1 then
				ply:ConCommand("pp_colormod 1")
				ply:ConCommand("pp_colormod_brightness -2")
			end
		end
	end
	hook.Add("Think", "moocow_keepblinded", keepBlinded)
end